package org.dream.persistence;

import java.util.List;
import java.util.Map;

import org.dream.domain.Daydeal;
import org.dream.domain.Dealrecord;
import org.dream.domain.Industry;
import org.dream.domain.Stock;
import org.dream.dto.LongTou;

public interface PersistenceService extends BaseDAO {
	

	

	public List findAll(Class class1);

	public boolean isEmpty(String class1);

	public List<Stock> findMySelectStocks();

	/**
	 * 按时间正序，涨幅倒序排列
	 * 
	 * @return
	 */
	public List<Industry> findAllIndustry();

	/**
	 * 按时间正序，涨幅倒序排列
	 * 
	 * @return
	 */
	public List<Industry> findAllIndustryByCalculate();

	/**
	 * 按照最新的一天jzf排序
	 */
	public List<String> findIndustryBkmc(boolean calculate);

	public Stock getStockByCode(String code);

	public List<Stock> getStocksByCode(List<String> code);

	public void clearDB(Class class1);

	/**
	 * 根据股票编号，开始时间，结束时间来查找股票
	 */
	public List<Daydeal> findDaydealsByCode(String code, String startdate, String enddate);

	public void saveDealRecords(List<Dealrecord> dealRecords);

	/************************************ 行情信息 **********************************************************/

	/**
	 * 批量保存日行情信息
	 * 
	 * @param daydeals
	 */
	public void saveDaydeals(List<Daydeal> daydeals);

	/**
	 * 找到最新的日行情信息
	 * 
	 * @param code
	 *            股票代码
	 * @return 日行情信息
	 */
	public Daydeal findRecentlyDaydeal(String stockCode);

	public List<Dealrecord> findAllDealRecord();

	public Map<String, List<LongTou>> findLongTous();

	/** 得到大盘一天点位 */
	public Double getDaydealPoint(String day, String code);

	public List<Daydeal> findDayDealsByCode(String code);
}
